package com.internetCafes.spms.web.project.common;

import java.util.Arrays;

/**
 * 项目相关常量
 */
public class ProjectConst {

    public enum StatusTag {
        WINNING_BIDDER("中标", 1),
        TO_BE_BUILT("待建", 2),
        BUILDING("在建", 3),
        COMPLETION("竣工", 4),
        ;

        private String value;
        private Integer tag;

        StatusTag(String value, Integer tag) {
            this.value = value;
            this.tag = tag;
        }

        public String getValue() {
            return value;
        }

        public Integer getTag() {
            return tag;
        }

        public String getValueByTag(Integer tag) {
            for (StatusTag statusTag : values()) {
                if (statusTag.getTag().equals(tag))
                    return statusTag.getValue();
            }
            return "";
        }
    }
}
